package fifth;

public class Circledemo {
    public static void main(String[] args) {
        Circledemo circle1 = new Circledemo();
        System.out.println("The area of the circle of radius " + circle1.radius + " is " + circle1.getArea());

        Circledemo circle2 = new Circledemo(25);
        System.out.println("The area of the circle of radius " + circle2.radius + " is " + circle2.getArea());

        Circledemo circle3 = new Circledemo(125);
        System.out.println("The area of the circle of radius " + circle3.radius + " is " + circle3.getArea());

        circle2.radius=100;
        System.out.println("The area of the circle of radius " + circle2.radius + " is " + circle2.getArea());

    }

        double radius;

        Circledemo() {
            radius = 1;
        }

        Circledemo(double newRadius) {
            radius = newRadius;
        }

        double getArea() {
            return radius * radius * Math.PI;
        }

        double getPerimeter() {
            return 2 * radius * Math.PI;
        }

        void setRadius(double newRadius) {
            radius = newRadius;
        }




}